package com.visec.hdy.hadoop.storage;

import com.alibaba.fastjson.JSONObject;
import com.visec.hdy.hadoop.standard.Analysis.Item;
import com.visec.hdy.hadoop.standard.FSB;
/**
 * 数据json化存储实现类
 * @author hdy
 *
 * @param <K>
 * @param <V>
 */
public class JsonLogStorageImpl<K, V> extends LogStorageImpl<K, V> {

	public JsonLogStorageImpl(FSB fsb) {
		super(fsb);
	}

	@Override
	protected String dataFormat(Item<K, V> item) {
		return item.getKey().toString() + DELIMITER + JSONObject.toJSONString(item.getObject());
	}

}
